package com.jiaai.cloud.gift.controller;


import com.jiaai.cloud.base.exception.ServiceException;
import com.jiaai.cloud.base.util.RestResultGenerator;
import com.jiaai.cloud.gift.service.ITLiveGiftDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 直播间礼物赠送表 前端控制器
 * </p>
 *
 * @author 佳爱网络科技
 * @since 2017-08-01
 */
@RestController
@RequestMapping("/api/manage/tLiveGiftDetail")
public class TLiveGiftDetailController {
	@Autowired
    private ITLiveGiftDetailService  itLiveGiftDetailService;


    //查找所有的
    @RequestMapping(value = "/findByAll", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"})
    @ResponseBody
    public Object findByAll( ) throws ServiceException {
        try {
            return RestResultGenerator.genSuccessResult( itLiveGiftDetailService.selectList(null));
        } catch (Exception e) {
            throw new ServiceException("查询失敗", e.getMessage());
        }
    }



}
